package com.hadwinling.blog.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.hadwinling.blog.entity.Day;
import com.hadwinling.blog.mapper.DayMapper;
import com.hadwinling.blog.service.DayService;

import java.util.List;

/**
 * @author HadwinLing
 * @version V1.0
 * @Package com.hadwinling.blog.service.impl
 * @date 2020/8/19 8:12
 */
@Service
public class DayServiceImpl implements DayService {

    @Resource
    private DayMapper dayMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return dayMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Day record) {
        return dayMapper.insert(record);
    }

    @Override
    public int insertSelective(Day record) {
        return dayMapper.insertSelective(record);
    }

    @Override
    public Day selectByPrimaryKey(Integer id) {
        return dayMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Day> selectAllByState(Integer state) {
        return dayMapper.selectAllByState(state);
    }

    @Override
    public List<Day> selectAllByStateAndTop(Integer state, Integer top) {
        return dayMapper.selectAllByStateAndTop(state, top);
    }

    @Override
    public int updateByPrimaryKeySelective(Day record) {
        return dayMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Day record) {
        return dayMapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateTopById(Integer updatedTop, Integer id) {
        return dayMapper.updateTopById(updatedTop, id);
    }

    @Override
    public List<Day> selectAllByStateOrderByCreatetime(Integer state) {
        return dayMapper.selectAllByStateOrderByCreatetime(state);
    }

}



